<template>
	<view class="news">
		
		<books-item  :detriment="bookslist"></books-item>

	</view>
</template>

<script>
	import booksItem from '../../components/books-item/books-item.vue'
	export default{
		data(){
			return{
				bookslist:[],
				uid:0,
				phone:'',
			}
		},
		methods:{
			async getUserInfo(){
				const res = await this.$myRequest({
							url: '/user/getUserInfo'
							})
							// console.log(res)
							console.log(res)
							this.bookslist=res.data
							console.log(this.bookslist[0])
							this.uid=res.data[1]
							this.phone=res.data[0]
										
			},
			
		
		},
		components: {"books-item":booksItem},
		onShow() {
				
					// this.$forceUpdate()
					this.getUserInfo()
					
					
			
			}

		
	}
</script>

<style>
</style>
